// 引入 react 依赖
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { NativeEventEmitter, DeviceEventEmitter, Image, TextInput, NativeModules, Platform, StyleSheet, ScrollView, Text, View, TouchableOpacity, TouchableHighlight, Alert, InteractionManager } from 'react-native';
import * as ActionTypes from '../../constants/constants.js';

// 引入第三方依赖
import _ from 'lodash';
import pureRender from 'pure-render-decorator';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import moment from 'moment';
import { Actions } from 'react-native-router-flux';
import BleManager from 'react-native-ble-manager';

// const BleManagerModule = NativeModules.BleManager;
// const bleManagerEmitter = new NativeEventEmitter(BleManagerModule);

// antd 按需加载
import { Tabs, Toast, Button, ListView, ActivityIndicator, Portal } from '@ant-design/react-native';

// 引入 处理数据 所需文件
import { } from './module/module.js'
import { deviceHeartRate, deviceHeartRateDetail, deviceHeartRateList } from '../../module/module.js'

// 引入样式
import Style from './style/style.js';

// 引入公用组件
import { Status, NavBar, Results } from '../../components/index.js'

// 引入专用组件
import { } from './components'

// 引入工具包
import { press, size, ScreenWidth, saveData, removeData, loadData, bodyPlus, defaultDataList, onEndReached, onRefresh, concatDataList, defaultPage } from '../../util/utils.js'
class Data extends Component {

  constructor(props) {
    super(props)
    this.state = {
      deviceList: [],
      loading: false,
      bodyData: []
    }

  }


  componentDidMount() {

  }



  render() {
    return (
      <View style={Style.container}>
        <Status />
        <NavBar
          title="健康数据"
        />
        <ScrollView style={Style.content}>
          <Results type='data' width={size(500)} height={size(200)} />
        </ScrollView>
      </View >
    );
  }
}


export default connect(({ user, myDevice, offlineStatus, connectStatus, ecgStatus }) => ({
  user, myDevice, offlineStatus, connectStatus, ecgStatus
}))(pureRender(Data))
